/*    This file is part of Nephite Exchange.
 *
 *    Nephite Exchange is free software: you can redistribute it and/or modify
 *    it under the terms of the GNU General Public License as published by
 *    the Free Software Foundation, either version 3 of the License, or
 *    (at your option) any later version.
 *
 *    Nephite Exchange is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *    GNU General Public License for more details.
 *
 *    You should have received a copy of the GNU General Public License
 *    along with Nephite Exchange.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.icub3d.nephiteexchange.client;

import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;

public class AboutPanel extends VerticalPanel {
	
	HTML aboutHTML = new HTML("<h2>Introduction</h2>" + 
			"" + 
			"<p>Nephite Exchange helps you convert any current earthly currency into the currency of that used by the Nephite's. It is a fun way to see how your pay check, daily wage, or tithing would compare to that of a Nephite. The calculations are precise, but some assumptions are made. Nonetheless, looking up the how much you would make in a Nephite village may give you some interesting insgight into how you would have lived back in their time.</p>" + 
			"<p>The Nephite conversion and exchange is based on the scripture evidence we find of the coinage in Alma 11:</p>" + 
			"<ol start=\"5\">" + 
			"  <li>Now the reckoning is thus—a senine of gold, a seon of gold, a shum of gold, and a limnah of gold.</li>" + 
			"  <li>A senum of silver, an amnor of silver, an ezrom of silver, and an onti of silver.</li>" + 
			"  <li>A senum of silver was equal to a senine of gold, and either for a measure of barley, and also for a measure of every kind of grain.</li>" + 
			"  <li>Now the amount of a seon of gold was twice the value of a senine.</li>" + 
			"  <li>And a shum of gold was twice the value of a seon.</li>" + 
			"  <li>And a limnah of gold was the value of them all.</li>" + 
			"  <li>And an amnor of silver was as great as two senums.</li>" + 
			"  <li>And an ezrom of silver was as great as four senums.</li>" + 
			"  <li>And an onti was as great as them all.</li>" + 
			"  <li>Now this is the value of the lesser numbers of their reckoning—</li>" + 
			"  <li>A shiblon is half of a senum; therefore, a shiblon for half a measure of barley.</li>" + 
			"  <li>And a shiblum is a half of a shiblon.</li>" + 
			"  <li>And a leah is the half of a shiblum.</li>" + 
			"  <li>Now this is their number, according to their reckoning.</li>" + 
			"  <li>Now an antion of gold is equal to three shiblons.</li>" + 
			"</ol>" + 
			"<p>These scriptures gives us an accurate table of what coins were worth in comparison to each other as well as a measure of barley. Given the scriptures, we know this about the coinage:</p>" + 
			"<table class=\"exchangeTable\">" + 
			"	<tr class=\"exchangeTableHeader\">" + 
			"		<td>Gold</td>" + 
			"		<td>Silver</td>" + 
			"		<td>Relative Value</td>" + 
			"		<td>Information</td>" + 
			"	</tr>" + 
			"	<tr class=\"lightTableBackground\">" + 
			"		<td>Limnah</td>" + 
			"		<td>Onti</td>" + 
			"		<td>7</td>" + 
			"		<td></td>" + 
			"	</tr>" + 
			"	<tr class=\"darkTableBackground\">" + 
			"		<td>Shum</td>" + 
			"		<td>Ezrom</td>" + 
			"		<td>4</td>" + 
			"		<td></td>" + 
			"	</tr>" + 
			"	<tr class=\"lightTableBackground\">" + 
			"		<td>Seon</td>" + 
			"		<td>Amnor</td>" + 
			"		<td>2</td>" + 
			"		<td></td>" + 
			"	</tr>" + 
			"	<tr class=\"darkTableBackground\">" + 
			"		<td>Antion</td>" + 
			"		<td></td>" + 
			"		<td>1.5</td>" + 
			"		<td></td>" + 
			"	</tr>" + 
			"	<tr class=\"lightTableBackground\">" + 
			"		<td>Senine</td>" + 
			"		<td>Senum</td>" + 
			"		<td>1</td>" + 
			"		<td>A measure of barley. Daily wage for judge.</td>" + 
			"	</tr>" + 
			"	<tr class=\"darkTableBackground\">" + 
			"		<td></td>" + 
			"		<td>Shiblon</td>" + 
			"		<td>0.5</td>" + 
			"		<td></td>" + 
			"	</tr>" + 
			"	<tr class=\"lightTableBackground\">" + 
			"		<td></td>" + 
			"		<td>Shiblum</td>" + 
			"		<td>0.25</td>" + 
			"		<td></td>" + 
			"	</tr>" + 
			"	<tr class=\"darkTableBackground\">" + 
			"		<td></td>" + 
			"		<td>Leah</td>" + 
			"		<td>0.125</td>" + 
			"		<td></td>" + 
			"	</tr>" + 
			"</table>" + 
			"<h2>Conversion</h2>" + 
			"<p>While the mathematics in conversion may be simple, coming up with an exchange rate for the Nephite currency is not so simple and relies on a few historical hints. As you may or may not know, nobody deals in Nephite currency these days. In fact, the only link we have between their currency and ours is from verses 7 and 15, where it compares the coinage to a \"measure of barley.\" The actual volume of a measure is not known, but most historians believe that it was approximately 1 liter. This estimation is also backed up by the greek translation of the bible suggesting 1 liter as well.</p>" + 
			"<p>Given that, we can compare today's price of barley to get a decent conversion. Because of the guess at the meaning of a \"measure,\" the exchange calculations are estimations.</p>" + 
			"<h2>Updates</h2>" + 
			"<p>The exchange rate for a given currency changes frequently. Even the price of barley changes regularly. To keep the exchanges current, the exchange rate and barley prices are updated daily. This will give you a good idea of what the exchange rate is as of today, no matter when that is.</p>" +
			"<h2>Source Code</h2>" +
			"<p>The source code for this application is available under the terms of the <a href=\"http://www.gnu.org/licenses/gpl-3.0.html\">GNU General Public License, version 3</a> at <a href=\"http://code.google.com/p/nephite-exchange/\">http://code.google.com/p/nephite-exchange/</a> </p>"
	);
	
	public AboutPanel () {
		super ();

		setStyleName("aboutPanel");
		
		add(aboutHTML);
	}
}
